<?php
    header('Content-Type: application/json; charset=utf8');
    //============================================================
    // USAGE get.php?time=2522&name=asas
    //============================================================

    require_once('class.mysql.php');
    
    if(!isset($_GET['name']) || !isset($_GET['time']) ){
        die("Provide correct values!");
    }
    
    $name = $_GET['name'];
    $time = $_GET['time'];
    
    $db = new Mysql($_GET['table']);
    echo json_encode($db->getSince($name, $time));
?>
   